<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wincache.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wincache.stats.html">WinCache Statistics Script</a></div>
 <div class="up"><a href="wincache.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="wincache.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  The following table lists and explains the configuration settings 
  provided by the WinCache extension:
 </p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>WinCache configuration options</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>Minimum</th>
      <th>Maximum</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.fcenabled" class="link">wincache.fcenabled</a></td>
      <td>&quot;1&quot;</td>
      <td>&quot;0&quot;</td>
      <td>&quot;1&quot;</td>      
      <td>PHP_INI_ALL</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.fcenabledfilter" class="link">wincache.fcenabledfilter</a></td>
      <td>&quot;NULL&quot;</td>
      <td>&quot;NULL&quot;</td>
      <td>&quot;NULL&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.fcachesize" class="link">wincache.fcachesize</a></td>
      <td>&quot;24&quot;</td>
      <td>&quot;5&quot;</td>
      <td>&quot;255&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.fcndetect" class="link">wincache.fcndetect</a></td>
      <td>&quot;1&quot;</td>
      <td>&quot;0&quot;</td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.1.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.maxfilesize" class="link">wincache.maxfilesize</a></td>
      <td>&quot;256&quot;</td>
      <td>&quot;10&quot;</td>
      <td>&quot;2048&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ocenabled" class="link">wincache.ocenabled</a></td>
      <td>&quot;1&quot;</td>
      <td>&quot;0&quot;</td>
      <td>&quot;1&quot;</td>      
      <td>PHP_INI_ALL</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>
 
     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ocenabledfilter" class="link">wincache.ocenabledfilter</a></td>
      <td>&quot;NULL&quot;</td>
      <td>&quot;NULL&quot;</td>
      <td>&quot;NULL&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>
     
     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ocachesize" class="link">wincache.ocachesize</a></td>
      <td>&quot;96&quot;</td>
      <td>&quot;15&quot;</td>
      <td>&quot;255&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.filecount" class="link">wincache.filecount</a></td>
      <td>&quot;4096&quot;</td>
      <td>&quot;1024&quot;</td>
      <td>&quot;16384&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.chkinterval" class="link">wincache.chkinterval</a></td>
      <td>&quot;30&quot;</td>
      <td>&quot;0&quot;</td>
      <td>&quot;300&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ttlmax" class="link">wincache.ttlmax</a></td>
      <td>&quot;1200&quot;</td>
      <td>&quot;0&quot;</td>
      <td>&quot;7200&quot;</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.enablecli" class="link">wincache.enablecli</a></td>
      <td>0</td>
      <td>0</td>
      <td>1</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ignorelist" class="link">wincache.ignorelist</a></td>
      <td>NULL</td>
      <td>NULL</td>
      <td>NULL</td>      
      <td>PHP_INI_ALL</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.namesalt</a></td>
      <td>NULL</td>
      <td>NULL</td>
      <td>NULL</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.0.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.ucenabled" class="link">wincache.ucenabled</a></td>
      <td>1</td>
      <td>0</td>
      <td>1</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.1.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.ucachesize</a></td>
      <td>8</td>
      <td>5</td>
      <td>85</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.1.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.scachesize</a></td>
      <td>8</td>
      <td>5</td>
      <td>85</td>      
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.1.0</td>
     </tr>

     <tr>
      <td><a href="wincache.configuration.html#ini.wincache.rerouteini" class="link">wincache.rerouteini</a></td>
      <td>NULL</td>
      <td>NULL</td>
      <td>NULL</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since WinCache 1.2.0</td>
     </tr>

    </tbody>
   
  </table>

  有关 PHP_INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.html" class="xref">配置可被设定范围</a>。
 </p>
 
 <p class="para">这是配置指令的简短说明。</p>
 
 <p class="para">
  <dl>

   
    <dt id="ini.wincache.fcenabled">
     <em><code class="parameter">wincache.fcenabled</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <span class="simpara">Enables or disables the file cache functionality.</span>
    </dd>

   
   
    <dt id="ini.wincache.fcenabledfilter">
     <em><code class="parameter">wincache.fcenabledfilter</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines a comma-separated list of IIS web site identifiers where file 
      cache should be enabled or disabled. This setting works in conjunction 
      with <em>wincache.fcenabled</em>: if <em>wincache.fcenabled</em> 
      is set to 1, then the sites listed in the <em>wincache.fcenabledfilter</em>
      will have the file cache turned off; if <em>wincache.fcenabled</em> 
      is set to 0, then the sites listed in the <em>wincache.fcenabledfilter</em> 
      will have the file cache turned on.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.fcachesize">
     <em><code class="parameter">wincache.fcachesize</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum memory size (in megabytes) that is allocated for the file cache. 
      If the total size of all the cached files exceeds the value specified in this setting, 
      then most stale files will be removed from the file cache.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.fcndetect">
     <em><code class="parameter">wincache.fcndetect</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Enables or disables the file change notification detection functionality. If file change 
      notification is supported then it will be used to refresh the opcode and file cache entries
      as soon as the corresponding files are modified on a file system. If file change notification 
      is not supported, for example when using network file shares, then wincache will poll for 
      file changes at regular time intervals specified by <em>wincache.chkinterval</em>.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.maxfilesize">
     <em><code class="parameter">wincache.maxfilesize</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum allowed size (in kilobytes) for a single file to be cached. 
      If a file size exceeds the specified value, the file will not be cached. 
      This setting applies to the file cache only.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ocenabled">
     <em><code class="parameter">wincache.ocenabled</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <span class="simpara">Enables or disables the opcode cache functionality</span>
    </dd>

   
   
    <dt id="ini.wincache.ocenabledfilter">
     <em><code class="parameter">wincache.ocenabledfilter</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines a comma-separated list of IIS web site identifiers where opcode 
      cache should be enabled or disabled. This setting works in conjunction 
      with <em>wincache.ocenabled</em>: if <em>wincache.ocenabled</em> 
      is set to 1, then the sites listed in the <em>wincache.ocenabledfilter</em>
      will have the opcode cache turned off; if <em>wincache.ocenabled</em> 
      is set to 0, then the sites listed in the <em>wincache.ocenabledfilter</em> 
      will have the opcode cache turned on.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ocachesize">
     <em><code class="parameter">wincache.ocachesize</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum memory size (in megabytes) that is allocated for the 
      opcode cache. If the cached opcode size exceeds the specified value, 
      then most stale opcode will be removed from the cache. Note that the opcode 
      cache size must be at least 3 times bigger than file cache size. 
      If that is not the case the opcode cache size will be automatically increased.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.filecount">
     <em><code class="parameter">wincache.filecount</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines how many files are expected to be cached by the extension, so that appropriate 
      memory size is allocated at the startup time. If the number of files exceeds the specified 
      value, the WinCache will re-allocate more memory as needed.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.chkinterval">
     <em><code class="parameter">wincache.chkinterval</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines how often (in seconds) the extension checks for file changes in order 
      to refresh the cache. Setting it to 0 will disable the refreshing of the cache. 
      The file changes will not be reflected in the cache unless the cache entry for 
      that file is removed by scavenger or IIS application pool is recycled or 
      wincache_refresh_if_changed function is called.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ttlmax">
     <em><code class="parameter">wincache.ttlmax</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum time to live (in seconds) for a cached entry without being used. 
      Setting it to 0 will disable the cache scavenger, so the cached entries will never
      be removed from the cache during the lifetime of the IIS worker process.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.enablecli">
     <em><code class="parameter">wincache.enablecli</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines if caching is enabled when PHP is running in command line (CLI) mode.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ignorelist">
     <em><code class="parameter">wincache.ignorelist</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Defines a list of files that should not be cached by the extension. 
      The files list is specified by using file names only, separated by 
      the pipe symbol - &quot;|&quot;.
      <div class="example" id="example-528">
       <p><strong>Example #1 <em>wincache.ignorelist</em> example</strong></p>
       <div class="example-contents">
<div class="inicode"><pre class="inicode">wincache.ignorelist = &quot;index.php|misc.php|admin.php&quot;</pre>
</div>
       </div>

      </div>
     </p>
    </dd>

   
   
    <dt id="ini.wincache.namesalt">
     <em><code class="parameter">wincache.namesalt</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines a string that will be used when naming the extension 
      specific objects that are stored in shared memory. This is used 
      to avoid conflicts that may be caused if other applications within 
      an IIS worker process tries to access shared memory. The length of 
      the namesalt string cannot exceed 8 characters.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ucenabled">
     <em><code class="parameter">wincache.ucenabled</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Enables or disables the user cache functionality.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.ucachesize">
     <em><code class="parameter">wincache.ucachesize</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum memory size in megabytes that is allocated for the user cache. If the total 
      size of variables stored in the user cache exceeds the specified value, then the most stale variables 
      will be removed from the cache.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.scachesize">
     <em><code class="parameter">wincache.scachesize</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Defines the maximum memory size in megabytes that is allocated for the session cache. If the total 
      size of data stored in the session cache exceeds the specified value, then the most stale data 
      will be removed from the cache.
     </span>
    </dd>

   
   
    <dt id="ini.wincache.rerouteini">
     <em><code class="parameter">wincache.rerouteini</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <span class="simpara">
      Specifies an absolute or a relateve path to the reroute.ini file that contains the list of PHP functions 
      whose implementation should be replaced with the WinCache function equivalents. If a relative path is specified 
      then it is assumed to be relative to the location of php-cgi.exe file.
     </span>
    </dd>

   
  </dl>

 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wincache.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wincache.stats.html">WinCache Statistics Script</a></div>
 <div class="up"><a href="wincache.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
